package com.bstek.service;

import com.bstek.model.domain.Dept;
import com.bstek.model.domain.Employee;
import org.springframework.stereotype.Service;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;
import java.util.Map;

/**
 * @InterfaceName EmployeeService
 * @Description TODO
 * @Author fazi
 * @Date 2019/1/9 20:03
 * @Version 1.0
 **/
@Service
public interface EmployeeService {

    /**
     * @Description 根据 username 查询员工信息
     * @Author fazi
     * @Date  2019/1/9
     * @Param [username]
     * @return com.bstek.model.domain.Employee
     **/
    Employee get(String username);

    /**
     * @Description 查询员工信息
     * @Author fazi
     * @Date 2019/1/9 21:44
     * @Param [map]
     * @return java.util.List<com.bstek.model.domain.Employee>
     **/
    List<Employee> list(Map<String, Object> map);

    /**
     * @Description 统计员工数量
     * @Author fazi
     * @Date 2019/1/9 21:45
     * @Param [map]
     * @return int
     **/
    int count(Map<String, Object> map);

    /**
     * @Description 保存员工信息
     * @Author fazi
     * @Date 2019/1/9 21:48
     * @Param [user]
     * @return int
     **/
    int save(Employee user);

    /**
     * @Description 更新员工信息
     * @Author fazi
     * @Date 2019/1/9 21:49
     * @Param [user]
     * @return int
     **/
    int update(Employee user);
    /**
     * @Description 删除员工信息
     * @Author fazi
     * @Date 2019/1/9 21:52
     * @Param [username]
     * @return int
     **/
    
    int remove(String username);

    /**
     * @Description 批量删除员工信息
     * @Author fazi
     * @Date 2019/1/9 21:52
     * @Param [usernames]
     * @return int
     **/
    int batchremove(String[] usernames);

    /**
     * @Description 根据查询条件判断员工是否存在
     * @Author fazi
     * @Date 2019/1/9 21:54
     * @Param [params]
     * @return boolean
     **/
    boolean exits(Map<String, Object> params);
    
    /**
     * @Description 获取部门树集合
     * @Author fazi
     * @Date 2019/1/9 21:54
     * @Param []
     * @return com.bootdo.clouddoadmin.domain.Tree<com.bstek.model.domain.Dept>
     **/
    List<Dept> getTree();

    /**
     * 更新员工信息
     * @param employee
     * @return
     */
    int updateEmployee(Employee employee);

    /**
     * 更新员工图片
     * @param file 图片
     * @param avatar_data 裁剪信息
     * @param username 成员账号
     * @throws Exception
     */
    Map<String, Object> updateEmployeeImg(MultipartFile file, String avatar_data, String username) throws Exception;
}
